import vuex from "vuex";
import Vue from "vue";
Vue.use(vuex);
const store = new vuex.Store({
    state:{
        num:100,
        a:1,
        b:2,
        c:3
    },
    mutations:{
        CHANGE_NUM(state,payload){
            state.num+=payload;
        }
    },
    getters:{
        sum(state){
            return state.a+state.b+state.c+state.num;
        }
    }
})
export default store;